<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <meta name="keywords" content="关键词">
        <meta name="description" content="描述">
        <meta name="author" content="潭州教育-阿飞老师">
        <style>
            body{font-family: "Microsoft YaHei",serif;}
            body,dl,dd,p,h1,h2,h3,h4,h5,h6{margin:0;}
            ol,ul,li{margin:0;padding:0;list-style:none;}
            img{border:none;}
        
        </style>
    </head>
    <body>
        <div id="wrap"></div>
        
        <script>

            //ES6 定义变量的解构赋值

            /*let a = 10,
                b = 20,
                c = 30;
            */


            //let [a,b,c,d] = [10,20,30,50,80];
            //console.log(window.a);

            /*function fn(){
                let x = [];
                for(let i=0;i<5;i++){
                    x[i] = i*i;
                }
                return x;
            }

            let [a,b,c,d,e] = fn();*/


            /*let {a:x,b:y} = {a:10,b:20};
            console.log(x);*/

            //let {x:x,y:y} = {y:80,x:5};
            let {x,y} = {y:80,x:5};

            console.log(x);
            console.log(y);


            /*
            let a = 10;
            let b = 20;
            let c = {a,b,x:20};
            console.log(c);
            */


        </script>
    </body>
</html>














